﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Home.master" AutoEventWireup="true" CodeFile="Addmem.aspx.cs" Inherits="Addmem" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css"/>
    <script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
    <script>
        $(function () {
            $("#datepicker").datepicker();
        });
    </script>
     <table style="width: 100%;">
        <form id="reg" runat="server">
        <tr>
            <td style="text-align: left">
                <label for="txtUsername">Username</label>
            </td>
            <td style="text-align: left">
                <asp:TextBox ID="txtUsername" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUsername" ErrorMessage="Username cannot be blank"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <label for="txtPassword">Password</label>
            </td>
            <td style="text-align: left">
                <asp:TextBox ID="txtPassword" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPassword" ErrorMessage="Password cannot be blank"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
               <label for="txtRepass">Re-type Password</label></td>
            <td style="text-align: left">
                <asp:TextBox ID="txtRepass" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtPassword" ControlToValidate="txtRepass" ErrorMessage="Password dose not match"></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <label for="txtFullname">Fullname</label></td>
            <td style="text-align: left">
                <asp:TextBox ID="txtFullname" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtFullname" ErrorMessage="Fullname cannot be blank"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <label for="DropDownList1">Sex</label></td>
            <td style="text-align: left">
                <asp:DropDownList ID="DropDownList1" runat="server">
                    <asp:ListItem>Male</asp:ListItem>
                    <asp:ListItem>Female</asp:ListItem>
                    <asp:ListItem>Vozer</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: left">
                <label for="DropDownList1">Account type</label></td>
            <td style="text-align: left">
                <asp:DropDownList ID="DropDownList2" runat="server">
                    <asp:ListItem Value="0">User</asp:ListItem>
                    <asp:ListItem Value="1">Admin</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: left">
                <label for="Calendar1">Birthday</label></td>
            <td style="text-align: left">
                <input type="text" id="datepicker" name="datepicker"/>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: left">
                <label for="txtAddress">Address</label></td>
            <td style="text-align: left">
                <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtAddress" ErrorMessage="Address cannot be blank"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <label for="txtPhone">Phone Number</label></td>
            <td style="text-align: left">
                <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtPhone" ErrorMessage="Phone error" ValidationExpression="\d{10}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <label for="txtEmail">Email</label></td>
            <td style="text-align: left">
                <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtEmail" EnableTheming="True" ErrorMessage="Email error" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                &nbsp;</td>
            <td style="text-align: left">
                <asp:Button ID="Button1" runat="server" Text="Add new" OnClick="Button1_Click" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
        </form>
    </table>
</asp:Content>

